home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GameKit
/
Palettes
/
GameInfoPalette
/
GameInfoInspector.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
2KB
|
49 lines
#import "GameInfoInspector.h"
#import <appkit/appkit.h>
#import "GameInfo.h"
@implementation GameInfoInspector
- init
{
char buf[MAXPATHLEN + 1];
id bundle;
[super init];
bundle = [NXBundle bundleForClass:[GameInfo class]];
[bundle getPath:buf forResource:"GameInfoInspector" ofType:"nib"];
[NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
return self;
}
- (BOOL)wantsButtons { return YES; }
- revert:sender
{
// Put string in text object
[numSoundsText setIntValue:[object numSounds]];
[numTypesText setIntValue:[object numSoundTypes]];
[numStreamsText setIntValue:[object numSoundStreams]];
[maxHighScoresText setIntValue:[object maxHighScores]];
[numTablesText setIntValue:[object numHighScoreTables]];
[numOneUpsText setIntValue:[object numOneUps]];
[slotTypeText setStringValue:[[object slotType] stringValue]];
[passwordText setStringValue:[[object encryptedPassword] stringValue]];
return [super revert:sender];
}
- ok:sender
{
[object setnumSoundTypes: [numTypesText intValue]];
[object setnumSoundStreams: [numStreamsText intValue]];
[object setnumSounds: [numSoundsText intValue]];
[object setnumHighScoreTables: [numTablesText intValue]];
[object setMaxHighScores: [maxHighScoresText intValue]];
[object setNumOneUps: [numOneUpsText intValue]];
[object setSlotType: [slotTypeText stringValue]];
[object setEncryptedPassword: [passwordText stringValue]];
return [super ok:sender];
}
@end